#include "applicatwid.h"
#include"dialog/friendreqdialog.h"
#include "ui_applicatwid.h"
#include"global.h"

ApplicatWid::ApplicatWid(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::ApplicatWid)
{
    ui->setupUi(this);
}

ApplicatWid::~ApplicatWid()
{
    delete ui;
}

void ApplicatWid::setUser(const QString &name, const QString& message)
{
    ui->label_2->setText(name);
    ui->label->setPixmap(QPixmap(AvatarPath.arg(name)));
    ui->label_3->setText(message);
}

void ApplicatWid::on_examineBtn_clicked()
{
    friendReqDialog *f = new friendReqDialog;
    f->setUser(ui->label_2->text(), ui->label_3->text());
    f->setWindowTitle("查看好友申请");
    f->setCheckStyle();
    f->setAttribute(Qt::WA_DeleteOnClose);
    f->setWindowModality(Qt::ApplicationModal);
    f->show();
}
